#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <animbase.h>
#include <QBasicTimer>
#include <QMediaPlayer>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void ParseAnim();

private slots:
    void on_btnPlay_clicked();

    void on_btnStop_clicked();

    void on_btnChooseAudio_clicked();

    void on_btnLoad_clicked();

    void on_btnSave_clicked();

    void on_plainTextEdit_modificationChanged(bool arg1);

private:
    void AddOpsFromCommands(QString);

private:
    Ui::MainWindow *ui;

    QMultiMap<double, AnimOp> AnimOps;
    QBasicTimer mAnimTimer;
    QMediaPlayer mAudioPlayer;

    QString mCurrentFile, mResourceDir;
    bool mSaved;

signals:
    void ResourceDirChanged(QString);
};
#endif // MAINWINDOW_H
